import Vue from 'vue'

import Cookies from 'js-cookie'

import 'normalize.css/normalize.css'

import Element from 'element-ui'
//
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'

// 数据字典
import dict from './components/Dict'

import '@/utils/directives.js'

import drag from './utils/drag'
Vue.use(drag)
import borderDrag from './utils/borderDrag'
Vue.use(borderDrag)
import draghead from './utils/draghead'
Vue.use(draghead)
// forminput回车查询
import formkey from './utils/formKey'
Vue.use(formkey)
// 权限指令
import permission from './components/Permission'
// 初始化css
import './assets/styles/element-variables.scss'
// global css
import './assets/styles/index.scss'

import VueQuillEditor from 'vue-quill-editor'
// 引入vue-quill-editor样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import ImageResize from 'quill-image-resize-module';
Quill.register('modules/imageResize',ImageResize);
// 代码高亮
import VueHighlightJS from 'vue-highlightjs'
import 'highlight.js/styles/atom-one-dark.css'

import '@/assets/font_icon/iconfont.css'
import '@/assets/jCss/jCss.css'

import App from './App'
import store from './store'
import router from './router/routers'
import echarts from 'echarts'
import './assets/icons' // icon
import './router/index' // permission control
import BaiduMap from 'vue-baidu-map'

import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import VueContextMenu from 'vue-contextmenu'
import zSelect from '@/components/custom/zSelect'
import tableSelect from '@/components/tableSelect/tableSelect'
Vue.component('zSelect', zSelect)
Vue.component('tableSelect', tableSelect)
import jPdf from '@/components/jPdf/jPdf'
Vue.component('jPdf', jPdf)
import Direction from 'vue-direction-key'
// 引入自定义主题
import './theme/custom.scss'

import UmyUi from 'umy-ui'
import 'umy-ui/lib/theme-chalk/index.css'
Vue.use(UmyUi)
Vue.use(VueQuillEditor, /* { 默认全局 } */)
Vue.prototype.$echarts = echarts
Vue.use(VueHighlightJS)
Vue.use(mavonEditor)
Vue.use(permission)
Vue.use(dict)
Vue.use(Direction)
Vue.use(VueContextMenu)
Vue.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'C8y5QNyQ2N3Lk8ufQh71iH383YrC1ZPK'
})
Vue.use(Element, {
  size: Cookies.get('size') || 'small' // set element-ui default size
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
